import {deleted, get, post, put} from "@/api/client";

/**
 * 查询分页列表
 * @param  data
 */
export const getUserPage = (data) => {
    return post(`/user/page`, data);
};

/**
 * 修改User
 * @param  User
 */
export const updateUser = (data) => {
    return post("/user/updateById", data);
};

/**
 * 添加信息
 * @param  User
 */
export const addUser = (data) => {
    return post("/user/save", data);
};
/**
 * 删除
 * @param  id
 */
export const deletedUser = (data) => {
    return deleted("/user/delete", data);
};

/**
 * 根据id查询
 * @param  id
 */
export const getUserById = (id) => {
    return get(`/user/detail`, {id});
};

export const getTree = () => {
  return get(`/user/tree`);
};

/**
 * 查询全部列表
 */
export const getUserList = () => {
    return get(`/user/list`);
};


export const getMyself = () =>{
    return get(`/user/getMyself`);
};



export const getProUserList = (id) => {
  return get(`/user/get-pro-user-list`, {id});
};
 
export const getProUserIds = (id) => {
  return get(`/user/get-pro-user-ids`, {id});
};
export const doProUser = (data) => {
  return post("/user/do-pro-user", data);
};


 